package com;

import java.net.ServerSocket;
import java.net.Socket;

public class SocketServerTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int port = 2013;
		try{
			ServerSocket server = new ServerSocket(port);
			SocketServer serverHandler = new SocketServer();
			System.out.println("Server can accept mostly "+ Runtime.getRuntime().availableProcessors() + " clients at same time");
			System.out.println("Server start....");
			while(true){
				Socket socket = server.accept();
				serverHandler.createNewWorker(socket);
			}
		}catch (Exception e) {
			e.printStackTrace();
		}
	}

}
